package com.bigfire.dtm.core.web.facade.impl;

import com.bigfire.dtm.api.web.facade.RealtimeSettleFacade;
import com.bigfire.dtm.shared.common.ResponseWrapper;
import com.bigfire.dtm.shared.constant.Constants;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RestController;

/**
 * 秒结实现接口
 * @author Damon S.
 * @version v1.0.1
 * @date 2019年10月20日 16:07
 */
@RestController
@RequiredArgsConstructor
@Api(tags = "秒结实现")
public class RealtimeSettleFacadeImpl implements RealtimeSettleFacade {

    @Override
    @ApiOperation(value = "重载配置", notes = "重新加载系统配置数据(结算规则/安畅并行)")
    public ResponseWrapper<Boolean> reload() {
        return new ResponseWrapper<>(true);
    }

    @Override
    @ApiOperation(value = "启动秒结", notes = "启动秒结线程(可重复)")
    public ResponseWrapper<Boolean> start() {
        return new ResponseWrapper<>(true);
    }

    @Override
    @ApiOperation(value = "秒结状态", notes = "查看当前秒结状态")
    public ResponseWrapper<String> checkState() {
        return new ResponseWrapper<>(Constants.STR_EMPTY);
    }

    @Override
    @ApiOperation(value = "暂停秒结", notes = "暂停秒结操作")
    public ResponseWrapper<Void> pause() {
        return new ResponseWrapper<>();
    }

    @Override
    @ApiOperation(value = "继续秒结", notes = "继续秒结操作")
    public ResponseWrapper<Void> restore() {
        return new ResponseWrapper<>();
    }

    @Override
    @ApiOperation(value = "跳过秒结", notes = "跳过当前订单的秒结操作")
    public ResponseWrapper<Void> skip() {
        return new ResponseWrapper<>();
    }
}
